package com.example.demo.entity;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by pengwan on 2017/7/23.
 */
@Entity
@Table(name = "score")
public class Score extends EntityId{
    @Column(name="create_date")
    private Date createDate;

    @ManyToOne // 多对一关系所有者
    @JoinColumn(name = "student_id")
    private Student student;

    @ManyToOne // 多对一关系所有者
    @JoinColumn(name = "course_id")
    private Course course;

    @Column(name="score")
    private double score;

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    public Course getCourse() {
        return course;
    }

    public void setCourse(Course course) {
        this.course = course;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }
}
